home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CPTUTS22.ARJ / CAR.CPP < prev    next >
C/C++ Source or Header  |  1992-01-20  |  366b  |  24 lines

  1.                                   // Chapter 7 - Program 5
  2. #include "car.h"
  3.  
  4.  
  5. void car::initialize(int in_wheels, float in_weight, int people)
  6. {
  7.    passenger_load = people;
  8.    wheels = in_wheels;
  9.    weight = in_weight;
  10. }
  11.  
  12.  
  13. int car::passengers(void)
  14. {
  15.    return passenger_load;
  16. }
  17.  
  18.  
  19.  
  20.  
  21. // Result of execution
  22. //
  23. // (this file cannot be executed)
  24.